package com.utils;


import android.app.AlertDialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.TextFormat.UtilFonts;
import com.shareup.R;


public class AlertDialogHelper {

    public static AlertDialog setProgressDialog(AlertDialog progress, String message, Context context) {

        LayoutInflater infl = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        //
        View v = infl.inflate(R.layout.dialog_loading, null);
        //
        TextView mess = (TextView) v.findViewById(R.id.text_dialog_loading);
        UtilFonts.setTextRegularFont(mess);
        mess.setText(message);
        //
        AlertDialog.Builder dl = new AlertDialog.Builder(context);
        dl.setView(v);
        dl.setCancelable(false);
        //
        progress = dl.create();
        //

        return progress;
    }
}
